#ifndef _IMAGE_CROP_CROPWITHINPUT_
#define _IMAGE_CROP_CROPWITHINPUT_

#include "../../../function.h"

namespace sp::Image::Crop{

void registe_cropWithParas();

/* 
    crop大小在参数中
*/
class cropWithParas: public Function{
private:
    float w_min;
    float w_max;
    float h_min;
    float h_max;
public:
    cropWithParas(std::vector<std::string> v); // float w_min, float w_max, float h_min, float h_max
    cropWithParas(float w_min, float w_max, float h_min, float h_max);
    cropWithParas();
    virtual ~cropWithParas();
    static void registe();
    static Function* createObject(std::vector<std::string> params);
    static Function* createObject2();
    virtual void start();
    virtual bool waitForResource();
    virtual void process(std::vector<std::vector<Data*>>& data_input, std::vector<Data*>& data_output);
    virtual bool releaseResource();
    virtual void finish();
    virtual void copy(Function* other);
};

};

#endif